#pragma once
#include "base/function.hpp"
#include "base/noncopyable.h"
#include "base/config.h"

#include <sys/time.h>
namespace net_tools::base{
class Timeeventset;
class Timeevent : noncopyable{
 public:
  Timeevent() = delete;
  Timeevent(func func,timeval begin_time,Timeeventset* timeeventset);
  ~Timeevent();
  void Add_set();
  func       func_;
  timeval    next_time_; //next over time,set time use this
  Timeevent* before_;
  Timeevent* next_;
 private:
  Timeeventset* timeeventset_;
};

} // namespace net_tools::base